<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 插件菜单
*/
defined('BY_JYA') or exit('error');
$plugins=$this->plugins();
foreach($plugins as $ki=>&$item){
	$item['child']=$item['list'];
	unset($item['list']);
	foreach($item['child'] as $k=>&$p){
		if(!$p['is_install']){
			unset($item['child'][$k]);
		}else{
			if($p['actionurl']){
				$p['url']=$p['actionurl'];
			}else{
				$p['url']=$p['name'].'/basic.module_home/';
			}
		}
	}
}
// 是主应用时的菜单
$menus1=array(
	array(
	'title'=>'平台管理','fa'=>'icon-dianpu','url'=>'jy_xiaoeknow/index/','child'=>array(
		array('title'=>'课堂概况','child'=>array(
			array('url'=>'jy_xiaoeknow/index/','title'=>'课堂概况'),
			array('url'=>'jy_xiaoeknow/basic.module_home/cover/ac=index&type=3','title'=>'课堂入口'),
			array('url'=>'jy_xiaoeknow/links/','title'=>'常用链接'),
			array('url'=>'core/account.article_list/','title'=>'公告列表'),
			array('url'=>'core/account.article_fenlei/','title'=>'公告分类'),
			array('url'=>'jy_xiaoeknow/feedback/','title'=>'投诉建议'),
		)),
		array('title'=>'参数设置','child'=>array(
			array('url'=>'jy_xiaoeknow/setting/basic','title'=>'基本设置'),
			array('url'=>'jy_xiaoeknow/xieyi/','title'=>'平台协议'),
		)),
	)),
	array('title'=>'课程管理','fa'=>'icon-gengduotupian','url'=>'jy_xiaoeknow/video/','child'=>array(
		array('title'=>'课程管理','child'=>array(
			array('url'=>'jy_xiaoeknow/video/','title'=>'无章节课程'),
			array('url'=>'jy_xiaoeknow/video1/','title'=>'有章节课程'),
			array('url'=>'jy_xiaoeknow/video_group/','title'=>'课程分类'),
			array('url'=>'jy_xiaoeknow/video_msg/','title'=>'课程评价'),
		)),
	)),
	array('title'=>'用户管理','fa'=>'icon-wo1','url'=>'jy_xiaoeknow/user/list/','child'=>array(
		array('title'=>'用户管理','child'=>array(
			array('url'=>'jy_xiaoeknow/user/list','title'=>'普通用户列表'),
			array('url'=>'jy_xiaoeknow/user/vip','title'=>'会员列表'),
			array('url'=>'jy_xiaoeknow/user/black','title'=>'黑名单'),
			array('url'=>'jy_xiaoeknow/poster/','title'=>'用户海报'),
		)),
	)),
	array('title'=>'员工管理','icon'=>'fa-users','url'=>'jy_xiaoeknow/kfgroups/','child'=>array(
		array('title'=>'员工管理','child'=>array(
			array('url'=>'jy_xiaoeknow/kfgroups/','title'=>'员工分组'),
			array('url'=>'jy_xiaoeknow/kefus/','title'=>'员工列表'),
		)),
	)),
	array('title'=>'分销管理','fa'=>'icon-dixiaofei','url'=>'jy_commission/agent/','child'=>array(
		array('title'=>'分销管理','child'=>array(
			array('url'=>'jy_commission/agent/','title'=>'分销商管理'),
			array('url'=>'jy_commission/member/','title'=>'会员管理'),
			array('url'=>'jy_commission/apply/','title'=>'审核分销商'),
			array('url'=>'jy_commission/order/','title'=>'分销订单'),
			array('url'=>'jy_commission/commission/','title'=>'佣金管理'),
			array('url'=>'jy_commission/creditlog/','title'=>'转积分列表'),
			array('url'=>'jy_commission/balance/','title'=>'结算管理'),
		)),
		array('title'=>'分销设置','child'=>array(
			array('url'=>'jy_commission/level/','title'=>'分销商等级设置'),
			array('url'=>'jy_commission/setting/','title'=>'基本设置'),
			array('url'=>'jy_commission/page_setting/','title'=>'样式设置'),
			array('url'=>'jy_commission/diyfrom/','title'=>'申请页面设置'),
			array('url'=>'jy_commission/levediyfrom/','title'=>'等级申请页面'),
		)),
	)),
	array('title'=>'财务管理','fa'=>'icon-dixiaofei','url'=>'jy_xiaoeknow/red/list/','child'=>array(
		array('title'=>'红包管理','child'=>array(
			array('url'=>'jy_xiaoeknow/red/list','title'=>'待发送红包列表'),
			array('url'=>'jy_xiaoeknow/red/ok','title'=>'红包发送成功列表'),
			array('url'=>'jy_xiaoeknow/red/no','title'=>'红包发送失败列表'),
		)),
		array('title'=>'提现管理','child'=>array(
			array('url'=>'jy_xiaoeknow/cashrecord/list','title'=>'申请提现列表'),
			array('url'=>'jy_xiaoeknow/cashrecord/ok','title'=>'审核通过列表'),
			array('url'=>'jy_xiaoeknow/cashrecord/no','title'=>'审核不通过列表'),
		)),
	)),
	array('title'=>'会员订单','fa'=>'icon-licai','url'=>'jy_xiaoeknow/order/','child'=>array(
		array('title'=>'课程订单','child'=>array(
			array('url'=>'jy_xiaoeknow/order/','title'=>'课程订单'),
		)),
		array('title'=>'vip订单','child'=>array(
			array('url'=>'jy_xiaoeknow/viporder/list','title'=>'待支付'),
			array('url'=>'jy_xiaoeknow/viporder/ok','title'=>'已支付'),
			array('url'=>'jy_xiaoeknow/viporder/no','title'=>'已取消'),
		)),
	)),
	array('title'=>'应用中心','isplugin'=>1,'fa'=>'icon-box','url'=>'jy_xiaoeknow/plugins/','child'=>$plugins),
);
if(empty($basicname)){
	$menus =$menus1?$menus1:$menus2;
	return $menus ;
}else{
	$basicmens = $this->plugin($basicname)->getmenus();
	if(!empty($basicmens)){
		foreach($basicmens as &$v){
			if($v['isplugin'] == 1){
				$v=$menus2[0];
			}
		}
	}
	return $basicmens;
}

